import 'package:github_client_app/models/user.dart';
import 'package:github_client_app/db/db_storage.dart';
import 'package:sqflite/sqflite.dart';

class StudentService extends DBStorage {
  // 单例模式
  static StudentService? _instance;
  factory StudentService() => _instance ??= StudentService._();
  StudentService._();

  @override
  String tableName = "student_info";

  @override
  Future<void> onCreate(Database db, int version) async {
    await db.execute("""
      CREATE TABLE $tableName (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        name TEXT,
        keywords TEXT,
        age INTEGER
      )
    """);
  }
}
